import {
  Entity,
  Column,
  Unique,
  PrimaryGeneratedColumn
} from 'typeorm'

@Entity('admin_user')
export class User {
  @PrimaryGeneratedColumn()
  id: number

  @Column()
  @Unique(['username'])
  avatar: string

  @Column()
  username: string

  @Column()
  password: string

  @Column()
  role: string

  @Column()
  nickname: string

  @Column()
  active: number
}
